import request from '@/config/axios'

// 单套餐 VO
export interface OneThaliVO {
  id: number // id主键
  thali: string // 套餐

amount: number // 套餐金额
  type: number // 类型（1.流量 ，2.充值金额，3.席位，4.短信，5.物流）
}

// 单套餐 API
export const OneThaliApi = {
  // 查询单套餐分页
  getOneThaliPage: async (params: any) => {
    return await request.get({ url: `/cost/one-thali/page`, params })
  },
  // 查询单套餐分页
  getFlow: async (params) => {
    return await request.get({ url: `/cost/one-thali/getFlowPage`,params })
  },
  // 查询单套餐分页
  getSeat: async () => {
    return await request.get({ url: `/cost/one-thali/getSeatPage`, })
  },

  // 查询单套餐详情
  getOneThali: async (id: number) => {
    return await request.get({ url: `/cost/one-thali/get?id=` + id })
  },

  // 新增单套餐
  createOneThali: async (data: OneThaliVO) => {
    return await request.post({ url: `/cost/one-thali/create`, data })
  },

  // 修改单套餐
  updateOneThali: async (data: OneThaliVO) => {
    return await request.put({ url: `/cost/one-thali/update`, data })
  },

  // 删除单套餐
  deleteOneThali: async (id: number) => {
    return await request.delete({ url: `/cost/one-thali/delete?id=` + id })
  },

  // 导出单套餐 Excel
  exportOneThali: async (params) => {
    return await request.download({ url: `/cost/one-thali/export-excel`, params })
  },
  // 导出单套餐 Excel
  switchStatus: async (params) => {
    return await request.put({ url: `/cost/one-thali/updateStatus`, data:params })
  },


}
